package com.ksc.storekeeper.client.view.validation;

import com.github.gwtbootstrap.client.ui.IntegerBox;


public class ValidatingIntegerBox extends IntegerBox implements IsValidatingWidget<Integer> {

	private final ValidatingHelper<Integer> helper;

	public ValidatingIntegerBox() {
		this.helper = new ValidatingHelper<Integer>(this);
		helper.setNumeric(true);
	}

	@Override
	public String getErrorMessage() {
		return helper.getErrorMessage();
	}

	@Override
	public Validation validate() {
		return helper.validate();
	}

	@Override
	public void showInvalid() {
		helper.showInvalid();
	}

	@Override
	public void removeInvalid() {
		helper.removeInvalid();
	}

	public void setRequired(boolean value) {
		helper.setRequired(value);
	}

	@Override
	public void setMinLength(int length) {
		helper.setMinLength(length);
	}

	@Override
	public void setMaxLength(int length) {
		super.setMaxLength(length);
		helper.setMaxLength(length);
	}

	@Override
	public Validation validateDouble(String value) {
		return null;
	}

	@Override
	public Validation validateListBox(String value) {
		return null;
	}

	@Override
	public Validation validateEmail() {
		return null;
	}

	@Override
	public Validation validate(String date) {
		return null;
	}

	@Override
	public Validation validateDoubleWithMinLimit(Double value, Double minValue) {
		return null;
	}

	@Override
	public Validation validatePassword() {
		return null;
	}

	@Override
	public Validation validatePin() {
		return null;
	}

}